﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Auditing;

namespace PHMEE
{
    public class Fleet : FullAuditedAggregateRoot<Guid>
    {
        protected Fleet()
        {

        }
        public Fleet(Guid id, string name, Guid companyId) : base(id)
        {
            SetName(name);
            CompanyId = companyId;
        }
        /// <summary>
        /// 船队名称
        /// </summary>
        public string Name { get; private set; }
        /// <summary>
        /// 船队类型
        /// </summary>
        public FleetTypeEnum FleetType { get; set; }
        /// <summary>
        /// 公司
        /// </summary>
        public Guid CompanyId { get; set; }

        public Fleet SetName(string name)
        {
            Name = Check.NotNullOrEmpty(name, nameof(name), FleetConst.MaxNameLength);
            return this;
        }
    }
}
